{extend name="apps/common/view/front.tpl" /}
<!-- -->
{block name="header_meta"}
<title>{:config('user.title_login')}－{:config('common.site_name')}</title>
<meta name="keywords" content="{:config('user.keywords_login')}" />
<meta name="description" content="{:config('user.description_login')}" />{/block}
{block name="header_more"}<link href="{:DcUrlCss($domain, $path_root.$path_view.'column.css')}" rel="stylesheet">{/block}
{block name="main"}
<div class="d-flex flex-column justify-content-center h-100">
  <a class="h4 text-light mx-auto mb-4" href="{$path_root}">{:config('common.site_name')}</a>
  <div class="card mx-auto card-width">
    <div class="card-header text-center pt-3">
      <a class="text-purple mr-3" href="javascript:;"><i class="fa fa-fw fa-sign-in"></i>验证码登录</a>
      <a class="text-muted" href="{:DcUrl('user/login/index')}"><i class="fa fa-fw fa-key"></i>密码登录</a>
    </div>
    <form class="card-body" action="{:DcUrl('user/account/notice')}" method="post" data-toggle="form" data-callback="daicuo.user.account">
      <img class="rounded img-fluid border w-100 mb-3" src="{$path_root}index.php?s=captcha" data-toggle="captcha"/>
      <div class="input-group input-group-sm mb-4">
        <div class="input-group-prepend">
          <span class="input-group-text"><i class="fa fa-fw fa-image"></i></span>
        </div>
        <input type="text" class="form-control" name="img_captcha" required="true" placeholder="图形码" autocomplete="off">
      </div>
      <div class="input-group input-group-sm mb-4">
        <div class="input-group-prepend">
          <span class="input-group-text"><i class="fa fa-fw fa-sign-in"></i></span>
        </div>
        <input type="text" class="form-control" name="user_name" required="true" placeholder="{:implode('/',array_map(lang,$sms_list))}" autocomplete="off">
      </div>
      <div class="input-group input-group-sm mb-4">
        <div class="input-group-prepend">
          <span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
        </div>
        <input type="text" class="form-control" name="user_captcha" placeholder="动态验证码" autocomplete="off" maxlength="6">
        <div class="input-group-append">
          <button class="btn btn-purple" id="btn-captcha" type="submit" data-toggle="submit" data-action="{:DcUrl('user/account/notice')}" data-second="{:config('user.captcha_interval')}" data-tips="重发">发送</button>
        </div>
      </div>
      <p class="text-center mb-0">
        <button class="btn btn-purple btn-block" id="btn-submit" type="submit" data-toggle="submit" data-action="{:DcUrl('user/account/update')}" disabled>登录/注册</button>
      </p>
    </form>
    <div class="card-footer text-center small">
      未注册的<strong>{:implode('/',array_map(lang,$sms_list))}</strong>验证成功后自动登录
    </div>
  </div>
</div>
{/block}